<template>
  <div class="about">
    <h1>This is an about page</h1>
    <child @ToParent = "show"></child>
    <h1>子组件传过来的值为：{{msg}}</h1>
  </div>
</template>
<script>
  import Child from '../components/Child'
  export default {
    components:{
      Child
    },
    data(){
      return{
        msg:''
      }
    },
    methods:{
      show(data){
        this.msg = data
      }
    }
  }
</script>
